package cn.janescott.inner.space.data;

import org.hibernate.boot.model.naming.Identifier;
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
import org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy;
import org.springframework.stereotype.Component;

/**
 * 处理mysql大小写敏感
 * 包括 cateLog、数据库名、表名、字段名、序列名
 *
 * @author scott
 * @date 2018/7/30
 */
@Component
public class MysqlSpringPhysicalNamingStrategy extends SpringPhysicalNamingStrategy {

    /**
     * @see SpringPhysicalNamingStrategy#toPhysicalTableName(Identifier, JdbcEnvironment)
     * 将大小写不敏感设为false
     */
    @Override
    protected boolean isCaseInsensitive(JdbcEnvironment jdbcEnvironment) {
        return false;
    }

}
